package com.caosy.grassthinkremote.common;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class RespData {
    private Long code;

    private Object data;

    private String errorMsg;

    public static RespData getFailure(String msg) {
        return RespData.builder()
                .code(500L)
                .errorMsg(msg)
                .build();
    }

    public static RespData getSuccess(Object data) {
        return RespData.builder()
                .code(200L)
                .data(data)
                .build();
    }
}
